<TestCase testName="Test_04_Orchestration1_Negative">
  <TestSetup>
    <TestStep assemblyPath="" typeName="Microsoft.Services.BizTalkApplicationFramework.BizUnit.FileDeleteMultipleStep">
      <Directory>C:\Fileports\Rec_01\</Directory>
      <SearchPattern>*.xml</SearchPattern>
    </TestStep>
    <TestStep assemblyPath="" typeName="Microsoft.Services.BizTalkApplicationFramework.BizUnit.FileDeleteMultipleStep">
      <Directory>C:\Fileports\Send_01\</Directory>
      <SearchPattern>*.xml</SearchPattern>
    </TestStep>
  </TestSetup>
  <TestExecution>
    <TestStep assemblyPath="" typeName="Microsoft.Services.BizTalkApplicationFramework.BizUnit.HttpPostStep">
      <SourcePath>.\BizUnitTests\TestData\Orchestrations\InDoc1.xml</SourcePath>
      <DestinationUrl>http://localhost/BizUnitSDK/BTSHTTPReceive.dll</DestinationUrl>
      <RequestTimeout>30000</RequestTimeout>
    </TestStep>
    <!-- Rename output directory to force a failure... -->
    <TestStep assemblyPath="" typeName="Microsoft.Services.BizTalkApplicationFramework.BizUnit.RenameDirectoryStep">
      <SourceDirectory>C:\Fileports\Send_01</SourceDirectory>
      <DestinationDirectory>C:\Fileports\Send_01x</DestinationDirectory>
    </TestStep>
    <TestStep assemblyPath="" typeName="Microsoft.Services.BizTalkApplicationFramework.BizUnit.FileCreateStep">
      <SourcePath>.\BizUnitTests\TestData\Orchestrations\InDoc1.xml</SourcePath>
      <CreationPath>C:\fileports\Rec_01\InDoc1.xml</CreationPath>
    </TestStep>
    <TestStep assemblyPath="" typeName="Microsoft.Services.BizTalkApplicationFramework.BizUnit.FileValidateStep">
      <Timeout>10000</Timeout>
      <Directory>C:\Fileports\Send_Error\</Directory>
      <SearchPattern>*.xml</SearchPattern>
      <DeleteFile>true</DeleteFile>
      <ValidationStep assemblyPath="" typeName="Microsoft.Services.BizTalkApplicationFramework.BizUnit.XmlValidationStep">
        <XmlSchemaPath>.\BizUnitTests\Schemas\PO_Ack.xsd</XmlSchemaPath>
        <XmlSchemaNameSpace>http://TestFrameworkDemo.PO_Ack</XmlSchemaNameSpace>
        <XPathList>
          <XPathValidation query="/*[local-name()='POAck' and namespace-uri()='http://TestFrameworkDemo.PO_Ack']/*[local-name()='PoNumber' and namespace-uri()='']">1234</XPathValidation>
          <XPathValidation query="/*[local-name()='POAck' and namespace-uri()='http://TestFrameworkDemo.PO_Ack']/*[local-name()='Status' and namespace-uri()='']">FAIL</XPathValidation>
        </XPathList>
      </ValidationStep>
    </TestStep>
    <!-- Check event log -->
    <TestStep assemblyPath="" typeName="Microsoft.Services.BizTalkApplicationFramework.BizUnit.EventLogCheckStep">
      <DelayBeforeCheck>0</DelayBeforeCheck>
      <!-- Optional, seconds to delay performing check -->
      <Machine>localhost</Machine>
      <EventLog>Application</EventLog>
      <Source>BizTalk Server 2006</Source>
      <Type>Error</Type>
      <!-- Note: Event ID abscent!	<EventId>5754</EventId> -->
      <ValidationRegex>A message sent to adapter "FILE" on send port "BizUnit_SDK_Orch1_SendPort"</ValidationRegex>
      <ValidationRegex>\\localhost\Fileports\Send_01\</ValidationRegex>
      <FailIfFound>False</FailIfFound>
    </TestStep>
  </TestExecution>
  <!-- Test cleanup: test cases should always leave the system in the state they found it -->
  <TestCleanup>
    <TestStep assemblyPath="" typeName="Microsoft.Services.BizTalkApplicationFramework.BizUnit.RenameDirectoryStep" failOnError="false">
      <SourceDirectory>C:\Fileports\\Send_01x</SourceDirectory>
      <DestinationDirectory>C:\Fileports\Send_01</DestinationDirectory>
    </TestStep>
    <TestStep assemblyPath="" typeName="Microsoft.Services.BizTalkApplicationFramework.BizUnit.FileDeleteMultipleStep" failOnError="false">
      <Directory>C:\Fileports\\Rec_01\</Directory>
      <SearchPattern>*.xml</SearchPattern>
    </TestStep>
    <TestStep assemblyPath="" typeName="Microsoft.Services.BizTalkApplicationFramework.BizUnit.FileDeleteMultipleStep" failOnError="false">
      <Directory>C:\Fileports\Send_Error\</Directory>
      <SearchPattern>*.xml</SearchPattern>
    </TestStep>
  </TestCleanup>
</TestCase>